<?php
/* 
* [评论管理模型]
* @Author: 			   Recall                 
* @Date:   			   2014-06-29 15:07:22        
* @Last Modified time: 2014-06-29 15:09:02
*/
	class CommentModel extends Model{
		//定义表名
		public $table = 'comment';

		/**
		 * [get_total 获得总数]
		 * @param  [type] $aid [文章aid]
		 * @return [type]      [description]
		 */
		public function get_total($aid){
			return $this->where(array('article_aid'=>$aid))->count();
		}

		/**
		 * [get_data 获得数据]
		 * @param  [type] $aid [文章aid]
		 * @return [type]      [description]
		 */
		public function get_data($aid){
			return $this->where(array('article_aid'=>$aid))->all();
		}
	}
?>
